﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace rbac.Contracts.DTO.Output
{
    /// <summary>
    /// 分页配置结果
    /// </summary>
    public class PageListOutput<T>
    {
        /// <summary>
        /// 数据
        /// </summary>
        public List<T>? Data { get; set; }
        /// <summary>
        /// 总条数
        /// </summary>
        public int Total { get; set; }
        /// <summary>
        /// 页大小
        /// </summary>
        public int PageSize { get; set; }

        /// <summary>
        /// 总页数
        /// </summary>
        public int TotalPage => Convert.ToInt32(Math.Ceiling(Total * 1.0 / PageSize));
            /*{ get
            {
                return Convert.ToInt32( Math.Ceiling(Total * 1.0 / PageSize));
            } }*/

    }
}
